package com.example.liaotian.view;

import android.content.Context;

public class SizeUtil {
        //像素转dp工具类
        public static int dip2px(Context context, float dpvalue){
            float scale = context.getResources().getDisplayMetrics().density;
            return (int)(dpvalue*scale+0.5f);
        }
    }

